{% extends 'base-layer.html' %}

{% load staticfiles %}

{% block css %}
    <link rel="stylesheet" href="{% static 'plugins/layui/css/layui.css' %}">
{% endblock %}

{% block main %}
    <input type="hidden" value="" id="route_status">
    <table class="layui-table" lay-skin="line" id="route_detail">
        <colgroup>
            <col width="150">
            <col width="150">
            <col width="200">
            <col>
        </colgroup>
        <thead>
        <tr>
            <th><strong>路由器详情</strong></th>
            <th><strong>参数</strong></th>
        </tr>
        </thead>
        <tbody>
        <tr>
            <td>名称</td>
            <td>{{ route.name }}</td>
        </tr>

        <tr>
            <td>Mac地址</td>
            <td>{{ route.mac_addr }}</td>
        </tr>

        <tr>
            <td>版本</td>
            <td>{{ route_detail.rom_version }}</td>
        </tr>

        <tr>
            <td>型号</td>
            <td>{{ route_detail.model }}</td>
        </tr>

        <tr>
            <td>绑定服务器</td>
            <td>
                {% if route.server_addr %}
                    {{ route.server_addr }}
                {% endif %}
            </td>
        </tr>

        <tr>
            <td>通道</td>
            <td>
                {% if route.get_tunnel_display %}
                    {{ route.get_tunnel_display }}
                {% endif %}
            </td>
        </tr>

        <tr>
            <td>绑定时间</td>
            <td>
                {% if route.bind_time %}
                    {{ route.bind_time }}
                {% endif %}
            </td>
        </tr>

        <tr>
            <td>内网IP</td>
            <td>
                {% if status == "在线" %}
                    {{ route_detail.internet_ip }}
                {% endif %}
            </td>
        </tr>

        <tr>
            <td>类型</td>
            <td>
                {% if  route_detail.mark == "C" %}
                    客户端
                {% else %}
                    路由器
                {% endif %}
            </td>
        </tr>

        <tr>
            <td>运营商</td>
            <td>
                {% if status == "在线" %}
                    {{ route_detail.isp }}
                {% endif %}
            </td>
        </tr>

        <tr>
            <td>省份</td>
            <td>
                {% if status == "在线" %}
                    {{ route_detail.province }}
                {% endif %}
            </td>
        </tr>
        </tbody>
    </table>
{% endblock %}

{% block javascripts %}

{% endblock %}